Skip to content

More misc optimizations flwemfewl#2023

Merged
andrew4328 merged 9 commits intoLambda-Mountain-Compiler-Backend:mainfrom
andrew4328:more-misc-optimizations-flwemfewl
Mar 31, 2026
Merged

More misc optimizations flwemfewl#2023
andrew4328 merged 9 commits intoLambda-Mountain-Compiler-Backend:mainfrom
andrew4328:more-misc-optimizations-flwemfewl

Conversation

@andrew4328
Copy link
Copy Markdown
Collaborator

@andrew4328 andrew4328 commented Mar 31, 2026

Describe your changes

Features:

  • moved AST.Typedef case from direct declaration to indirect declaration behind a pointer
  • this reduces the size of the AST type by 90%
  • speed is improved by about 30% (somehow memory size reduction helps here with zeroing and moves)
  • resulting in a total memory usage reduction in the compiler of 40% (9GB total with GC disabled)
  • PCTX was heavily affected by this because it contains a blame field and has many rows
  • so this will affect the memory usage of GC-enabled compiler more than current one

Issue ticket number and link

#1895

Checklist before requesting a review

  • [ x ] I have performed an AI-assisted self-review of my code.
Can you review my pull request and provide some suggestions?
https://patch-diff.githubusercontent.com/raw/Lambda-Mountain-Compiler-Backend/lambda-mountain/pull/1926.diff
  • [ x ] If it is a new feature, I have added thorough tests.
  • [ x ] I agree to release these changes under the terms of the permissive MIT license (1).
  1. https://github.com/andrew-johnson-4/lambda-mountain/blob/main/LICENSE

@andrew4328 andrew4328 merged commit 07e6a0e into Lambda-Mountain-Compiler-Backend:main Mar 31, 2026
1 check failed
@andrew4328 andrew4328 deleted the more-misc-optimizations-flwemfewl branch March 31, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant